var loadMsDateScripts = function(){
	if(typeof(msdate_loaded) != 'undefined') {  
		$( "#msdate-dialog" ).dialog('open');
	} else {
		var head = document.getElementsByTagName('head')[0];
		
		//load css files
		var jqueryui_css=document.createElement('LINK');
		jqueryui_css.setAttribute('type','text/css');
		jqueryui_css.setAttribute('rel','stylesheet');
		jqueryui_css.setAttribute('href','//ajax.googleapis.com/ajax/libs/jqueryui/1.7.0/themes/cupertino/jquery-ui.css');
		head.appendChild(jqueryui_css);
		
		var msdate_css = document.createElement('LINK');
		msdate_css.setAttribute('type','text/css');
		msdate_css.setAttribute('rel','stylesheet');
		msdate_css.setAttribute('href','//project-msdate.googlecode.com/svn/trunk/msdate.css');
		head.appendChild(msdate_css);
		
		//load js file
		var msdate_script = document.createElement('SCRIPT');
		msdate_script.setAttribute('type','text/javascript');
		msdate_script.src='//project-msdate.googlecode.com/svn/trunk/msdate.js';
		document.body.appendChild(msdate_script);
	}
}();